package com.ssy.lingxi.order.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 订单外部流转记录
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-17
 */
@Entity
@Table(schema = "public", name = "ord_outer_history", indexes = {@Index(name = "ord_outer_history_order_id_idx", columnList = "orderId"), @Index(name = "ord_outer_history_order_no_idx", columnList = "orderNo"), @Index(name = "ord_outer_history_create_time_idx", columnList = "createTime"), @Index(name = "ord_outer_history_member_id_idx", columnList = "memberId"), @Index(name = "ord_outer_history_role_id_idx", columnList = "roleId")})
public class OrderOuterHistoryDO implements Serializable {
    private static final long serialVersionUID = -8215089757475974358L;

    /**
     * 主键Id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ord_outer_history_seq")
    @SequenceGenerator(sequenceName = "ord_outer_history_seq", name = "ord_outer_history_seq", allocationSize = 1)
    private Long id;

    /**
     * 操作时间
     */
    @Column(columnDefinition = "timestamp")
    private LocalDateTime createTime;

    /**
     * 订单Id
     */
    @Column
    private Long orderId;

    /**
     * 订单编号
     */
    @Column(columnDefinition = "varchar(20)")
    private String orderNo;

    /**
     * （供应、采购）会员Id
     */
    @Column
    private Long memberId;

    /**
     * （供应、采购）会员角色Id
     */
    @Column
    private Long roleId;

    /**
     * 操作会员名称
     */
    @Column(columnDefinition = "varchar(200)")
    private String operatorMemberName;

    /**
     * 操作角色
     */
    @Column(columnDefinition = "varchar(50)")
    private String operatorRoleName;

    /**
     * 操作方法枚举，定义在 OrderOperationEnum 中
     */
    @Column
    private Integer operateCode;

    /**
     * 操作
     */
    @Column(columnDefinition = "varchar(400)")
    private String operation;

    /**
     * 订单外部状态枚举
     */
    @Column
    private Integer outerStatus;

    /**
     * 订单外部状态名称
     */
    @Column(columnDefinition = "varchar(50)")
    private String statusName;

    /**
     * 备注、意见
     */
    @Column(columnDefinition = "varchar(200)")
    private String remark;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getOperatorMemberName() {
        return operatorMemberName;
    }

    public void setOperatorMemberName(String operatorMemberName) {
        this.operatorMemberName = operatorMemberName;
    }

    public String getOperatorRoleName() {
        return operatorRoleName;
    }

    public void setOperatorRoleName(String operatorRoleName) {
        this.operatorRoleName = operatorRoleName;
    }

    public Integer getOperateCode() {
        return operateCode;
    }

    public void setOperateCode(Integer operateCode) {
        this.operateCode = operateCode;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public Integer getOuterStatus() {
        return outerStatus;
    }

    public void setOuterStatus(Integer outerStatus) {
        this.outerStatus = outerStatus;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
